package cn.lingyangwl.agile.plugin.file.preview.service.impl;

import cn.lingyangwl.agile.plugin.file.preview.model.FileAttribute;
import cn.lingyangwl.agile.plugin.file.preview.model.FilePreviewRS;
import cn.lingyangwl.agile.plugin.file.preview.service.FilePreview;
import org.springframework.stereotype.Service;
import org.springframework.ui.Model;

/**
 * svg 图片文件处理
 *
 * @author shenguangyang
 * @since 1.0.0
 */
@Service
public class EpubFilePreviewImpl implements FilePreview {

    private final PictureFilePreviewImpl pictureFilePreview;

    public EpubFilePreviewImpl(PictureFilePreviewImpl pictureFilePreview) {
        this.pictureFilePreview = pictureFilePreview;
    }

    @Override
    public FilePreviewRS filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
        pictureFilePreview.filePreviewHandle(url,model,fileAttribute);
        return FilePreviewRS.builder().type(EpubFilePreviewImpl).build();
    }
}
